<cfinclude template="/ecada/header.cfm">

<cfoutput>

<cfquery datasource="exp" name="numtrials">
    	select trial.id as id, location, conditions.description as conddescription, ispicture, stimuli.answer 
    	from trial, stimuli, conditions where trial.expid=#id#
    	and trial.stimid = stimuli.id 
    	and condid=conditions.id
    	order by condid 
    </cfquery>
<h1>Click image/icon to see result for individual trials</h1>
<cfloop query = numtrials>



<table border = 1><tr><td>
<cfif #IsNumeric(answer)#>
<cfif #ispicture# eq 1>
<a href="/ecada/analyse/answersgiven.cfm?trialid=#numtrials.id#"><img src="/ecada/#numtrials.location#" width=100></a></td><td>
<font color="red">Image:</font>#GetFileFromPath(numtrials.location)#<br>
<font color="red">Condition:</font> #numtrials.conddescription#

<cfelse>
<a href="/ecada/analyse/answersgiven.cfm?trialid=#numtrials.id#"><img src="/images/placeholder.png"></a></td><td>
<font color="red">File:</font> #GetFileFromPath(numtrials.location)#<br>
<font color="red">Condition:</font> #numtrials.conddescription#

</cfif>
</cfif>
</td></tr></table>
</cfloop>

</cfoutput>


<cfinclude template="/ecada/footer.cfm">
